package com.atmc.controller;

import com.atmc.entity.GoodsOrder;
import com.atmc.entity.OrderRequest;
import com.atmc.entity.ResponseResult;
import com.atmc.service.GoodsOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Objects;
import java.util.Random;

/**
 * @BelongsProject: SpringCloud1216
 * @BelongsPackage: com.atmc.controller
 * @Author: chuyings
 * @CreateTime: 2022-11-17  15:08
 * @Version: 1.0
 */
@RestController
@CrossOrigin
public class GoodsOrderController {
    @Autowired
    GoodsOrderService goodsOrderService;
    //提交商品订单
    @RequestMapping("/addGoodsOrder")
    public ResponseResult addGoodsOrder(@RequestBody OrderRequest orderRequest){

        return goodsOrderService.addGoodsOrder(orderRequest);
    }

}
